<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <script  src="../js/vue.js"></script>
    </head>
    <body>
        <div id="container">
            <input  type="checkbox" :checked="isAgree" @change="chg">同意注册协议
        </div>
        <script>
           var vm=new Vue({
               el:"#container",
               data:{
                   isAgree:false
               },
               methods:{
                   chg(event){
                      // console.log(event.target.checked)
                       this.isAgree=event.target.checked
                   }
               }
           });
        </script>
    </body>
</html>
